package org.example.repository;

import org.example.entity.ApiLog;
import org.apache.ibatis.annotations.Insert;
import org.springframework.stereotype.Repository;

@Repository
public interface ApiLogRepository {

    @Insert("INSERT INTO api_log (user_id, method, uri, request_params, request_body, response_body, status_code, start_time, end_time, duration) " +
            "VALUES (#{userId}, #{method}, #{uri}, #{requestParams}, #{requestBody}, #{responseBody}, #{statusCode}, #{startTime}, #{endTime}, #{duration})")
    void save(ApiLog apiLog);
}
